<?php
namespace Usap\Model\Admin;
use Usap\Model\BaseModel;

class RoleModel extends BaseModel{

   //数据源配置
    public function _initialize(){
        $this->connection = C('db_pool.admin');
        $this->trueTableName = 'admin_role';
    }

    
    /**
     * 获取角色中文名称
     * @param int $roleid 角色ID
     */
    public function getRoleName($roleid) {
    	$roleid = intval($roleid);
    	$rolename = $this->where(array('roleid'=>$roleid))->getField('rolename');
    	return $rolename;
    }
}